1. View Remote BranchGit branch-rOrigin/master2. View local Branch*masterNote : The local branch where the current is located is indicated by *3. View local and remote branchesGit branch
Use the git branch-a command to view all local and remote branches (git branch-r can view only remote branches)Found that many of the branches that have been deleted in the remote repository are still visible locally.
$ git
Master Branch and Dev branch already on GitHubOn a localgit checkout-b dev new and switch to local dev branchGit pull Origin dev local branch associated with remote branch===========================================================
When clone finishes the repository and switches to the development branch, a hint appears after using Git pull-r to pull and merge branches:$ git pull-rFrom Ssh://192.168.1.226:29418/ethank-serverBc86d14. B72fc88 Dev-and Origin/devThere is no tracking information for the current branch.Please specify which branch the w
1, create a new branch from an existing branch (such as from the Master branch), create a dev branchgit checkout-b Dev2, can be viewed once created, branch has switched to DevGit branch
This article contains two parts:1, create a new branch (branch) 2, back to a historical version of the project (history versions)
GIT Create a Project branch (branch) can solve the foll
branchTo create a branch:git branch To switch branches:git checkout Create + switch Branches:git checkout -b Merge a branch to the current branch:git merge To delete a branch:git branch -d Resolve ConflictsLife is not as good as ten, and merging branches is often not smooth
* [New branch] master - > Temp
su@suchangli/e/eoe_client/android-app (Master)
Git fetch Origin master:temp This command means: Download from the master branch of the remote Origin repository to local and create a new
In Android Studio, how does Git update the local remote branch list ?, Androidgit
For example, if your colleague adds branch xxx in Git's remote branch, but you find that when you view the existing branch in Android Studio, you ca
git Delete local branch error occurred
Deleting a local branch often occurs in the following ways: error:the branch ' testing ' is not fully merged.
With git
First, view existing branches
View existing branches: git branch commands;
As can be seen from the result, there is now only one branch master;
Second, create a branch
Create a
Sometimes you need to get the code for a remote branch from a remote git server, and the command is git fetch Origin remote-branch:local-branch, which is easier to forget, especially recorded.1. View Remote repositoriesGit remote-voriginhttp://git.dev.qianmi.com/elifeapp/weidian.git (Fetch) Originhttp://git.dev.qianmi.
Sometimes you need to get the code for a remote branch from a remote git server, and the command is GIT fetch Origin remote-branch:local-branch, which is easier to forget, especially recorded.
1. View Remote repositories
git Remote-v
Origin http://git.dev.qianmi.com/elif
There are 2 commands in git that get the latest version from the remote branch to the Local:
git fetch: The equivalent of getting the latest version from remote to local, not automatically merge
Git fetch origin master
, with the git status view workspace, it's clean (unless you have a file that's not managed by git), so you can safely create a branch to fix the bug.First determine which branch to fix the bug on, assuming that you need to master fix it on the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.